from os import path

# 获取UEDM工程所在目录的绝对路径
PROJECT_DIR = path.dirname(path.dirname(path.abspath(__file__)))

# 获取工程目录的绝对路径
WORK_DIR = path.dirname(PROJECT_DIR)

# robot framework 文本用例库的绝对路径
TESTCASES = path.join(PROJECT_DIR, 'testcases')

# Chrome游览器驱动文件的绝对路径
CHROME_DRIVER = path.join(PROJECT_DIR, 'chromedriver.exe')

# 临时文件目录的绝对路径
TEMP_DIR = path.join(PROJECT_DIR, 'temp')

# 上传文件的存储目录的绝对路径
UPLOAD_DIR = path.join(PROJECT_DIR, 'upload')

# 配置文件的绝对路径
CONFIG = path.join(PROJECT_DIR, 'config.yml')


def get_file_absolute_path(dir_absolute_path: str, file_name: str) -> str:
    """
        获取文件的绝对路径
    :param dir_absolute_path: 目录的绝对路径
    :param file_name: 文件名
    """
    return path.join(dir_absolute_path, file_name)


if __name__ == '__main__':
    print(PROJECT_DIR)
    print(WORK_DIR)
    print(CHROME_DRIVER)
    print(TEMP_DIR)

